<%@ page pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>add lesson here</title>
<style type="text/css">
td {
	text-align: center;
}

#tb1 {
	border: 1px;
	margin: 0;
	padding: 0;
	border-color: black;
	width: 80%;
	height: auto;
	border-style: solid;
}

#tb2 {
	margin: 0;
	padding: 0;
	width: 100%;
	height: auto;
}

a {
	text-decoration: none;
}

.tr1 {
	background-color: #cccccc;
}

.tr2 {
	background-color: #ccccff;
}
</style>
</head>

<body>

	<div align="center">
		<h1>课程编辑</h1>
		<hr>
	</div>

	<form action="lesson_add" method="post">
		<div align="left">
			<select name="tempLesson.tid" style="width: auto; " >
				<c:forEach var="teacher" items="${sessionScope.Tlist}">
					<option value="${teacher.id}">${teacher.id}&nbsp;${teacher.name}&nbsp;${teacher.lesson}</option>
				</c:forEach>
			</select> 时间：
			 <input type="text" name="tempLesson.yyyy" value="">年
			 <input type="text" name="tempLesson.mm" value="">月 
			 <input type="text" name="tempLesson.dd" value="">日 
			 <select name="tempLesson.hms">
				<option value="8:00:00">8:00~10:00 am</option>
				<option value="10:00:00">10:00~12:00 am</option>
				<option value="1:00:00">1:00~3:00 pm</option>
				<option value="3:00:00">3:00~5:00 pm</option>
				<option value="5:00:00">5:00~7:00 pm</option>
			</select>
		</div>

		<div align="center">
			<table id="tb2">
				<tr>
					<td>序号</td>
					<td>学号</td>
					<td>姓名</td>
					<td>选则</td>
				</tr>
				<c:forEach var="student" items="${sessionScope.Slist}"
					varStatus="num">
					<c:if test="${num.count%2==1}" var="flag">
						<c:set var="temp" value="tr1" scope="page"></c:set>
					</c:if>
					<c:if test="${!flag}">
						<c:set var="temp" value="tr2" scope="page"></c:set>
					</c:if>
					<tr class="${temp}">
						<td>${num.count}</td>
						<td>${student.id}</td>
						<td>${student.name}</td>
						<td><input type="checkbox" name="listCheck" value="${student.id}" /></td>
					</tr>
				</c:forEach>
				<tr>
					<td><input type="hidden" name="lesson.tid" value="1"><input type="submit" value="确认"></td>
				</tr>
			</table>
		</div>
	</form>

	<div align="center">
		<a href="index.jsp" style="text-decoration: none;"> 返回&raquo; </a>
	</div>


</body>
</html>